//api文件仍保留但不建议使用，推荐使用models中的api。API files remain preserved (deprecated), use models APIs instead.
import type { MinishopDispatch, MinishopDispatchResponse } from './types.js';

import { requestClient } from '#/api/request';

export const getuctooMinishopDispatchList = async (page: number, pageSize: number,
  searchParams?: any) => {
  return requestClient.get<MinishopDispatchResponse>(`/uctoo/minishop_dispatch/${pageSize}/${page}`,{
    params: searchParams,
  });
};

export const getuctooMinishopDispatch = async (id: string) => {
  return requestClient.get<MinishopDispatch>(`/uctoo/minishop_dispatch/${id}`);
};

export const adductooMinishopDispatch = async (data: Partial<MinishopDispatch>) => {
  return requestClient.post<MinishopDispatch>('/uctoo/minishop_dispatch/add', data);
};

export const edituctooMinishopDispatch = async (data: Partial<MinishopDispatch>) => {
  return requestClient.post<MinishopDispatch>('/uctoo/minishop_dispatch/edit', data);
};

export const deleteuctooMinishopDispatch = async (id: string) => {
  return requestClient.post<any>('/uctoo/minishop_dispatch/del', { id });
};
